<template>
  <div class="page">
    <div class="topnav-banner">
      <top-nav />
      <div class="banner">
        <h1>Gin-UI</h1>
        <h2>一个好用的 UI 框架</h2>
        <p class="actions">
          <a href="https://gitee.com/black-key/gin-ui">Gitee</a>
          <router-link to="/doc">开始</router-link>
        </p>
      </div>
    </div>

    <div class="features">
      <ul>
        <li>
          <svg class="icon logo">
            <use xlink:href="#icon-vue"></use>
          </svg>
          <h3>基于 Vue 3</h3>
          <p>使用了 Vue 3 Composition API</p>
        </li>
        <li>
          <svg class="icon logo">
            <use xlink:href="#icon-ts"></use>
          </svg>
          <h3>基于 TypeScript</h3>
          <p>源代码采用 TypeScript 书写</p>
        </li>
        <li>
          <svg class="icon logo">
            <use xlink:href="#icon-idea"></use>
          </svg>
          <h3>代码易读</h3>
          <p>每个组件的源代码都极其简洁</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script lang="ts">
import TopNav from '../components/TopNav.vue';

export default {
  components: {
    TopNav
  }
};
</script>

<style lang="scss" scoped>
$radius: 4px;
$color: rgb(23, 119, 114);
.topnav-banner {
  /* Created with https://www.css-gradient.com */
  background: #7aeecd;
  background: -webkit-linear-gradient(top left, #7aeecd, #555d2c);
  background: -moz-linear-gradient(top left, #7aeecd, #555d2c);
  background: linear-gradient(to bottom right, #7aeecd, #555d2c);
  clip-path: ellipse(75% 60% at 50% 30%);
}
.banner {
  padding: 100px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: $color;
  > .actions {
    padding: 8px 0;
    a {
      margin: 0 8px;
      background: #5c7a4c;
      color: #e3e3e3;
      display: inline-block;
      border-radius: $radius;
      padding: 8px 24px;
    }
  }
}

.features {
  margin: 64px auto;
  padding: 0 16px;
  @media (min-width: 800px) {
    width: 800px;
    > ul {
      > li {
        width: 50%;
      }
    }
  }
  @media (min-width: 1200px) {
    width: 1200px;
    > ul {
      > li {
        width: 33.3333%;
      }
    }
  }
  > ul {
    display: flex;
    flex-wrap: wrap;
    > li {
      margin: 16px 0;
      display: grid;
      justify-content: start;
      align-content: space-between;
      grid-template-areas:
        'icon title'
        'icon text';
      grid-template-columns: 80px auto;
      grid-template-rows: 1fr auto;
      > svg {
        grid-area: icon;
        width: 64px;
        height: 64px;
      }
      > h3 {
        grid-area: title;
        font-size: 28px;
      }
      > p {
        grid-area: text;
      }
    }
  }
}
</style>
